﻿namespace CoreShop.Library
{
    /// <summary>
    /// 公共委托调用
    /// </summary>
    public class PublicInvokeTool
    {
        /// <summary>
        /// 刷新商品和分类信息
        /// </summary>
        public static event DelegateClick reshClassifyAndProduct = null;

        /// <summary>
        /// 执行刷新商品和分类信息
        /// </summary>
        public static void ReshClassifyAndProductAction()
        {
            reshClassifyAndProduct?.Invoke();
        }

        /// <summary>
        /// 开启练习模式
        /// </summary>
        public static event DelegateClick startExercise = null;

        /// <summary>
        /// 执行开启练习模式
        /// </summary>
        public static void StartExerciseAction()
        {
            startExercise?.Invoke();
        }

        /// <summary>
        /// 程序退出
        /// </summary>
        public static event DelegateClick selfProcessExit = null;

        /// <summary>
        /// 执行退出代理
        /// </summary>
        public static void SelfProcessExit()
        {
            selfProcessExit?.Invoke();
        }

        /// <summary>
        /// 初始化取重
        /// </summary>
        public static event DelegateClick initScale = null;

        /// <summary>
        /// 初始化取重
        /// </summary>
        public static void InitScaleAction()
        {
            initScale?.Invoke();
        }

        /// <summary>
        /// 设置广告轮播时间
        /// </summary>
        public static event DelegateClickS setAdvertisingTime = null;

        /// <summary>
        /// 初始化取重(秒)
        /// </summary>
        public static void SetAdvertisingTime(int time)
        {
            setAdvertisingTime?.Invoke(time);
        }
    }
}
